package ${entityPackagePath};

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
${entityOtherImport}
/**
* @author ${author}
 * @url https://gitee.com/pucong
* @create ${date}
*/
@Data
@TableName("${tableName}")
@ApiModel("${tableAnnotation}")
public class ${changeTableName} implements Serializable {

    private static final long serialVersionUID = 1L;

<#if modelColumn?exists>
    <#list modelColumn as model>
        <#if model.isId >
    @TableId(value = "${model.columnName}",type = IdType.INPUT)
        <#else>
    @TableField("${model.columnName}")
        </#if>
        <#if (model.columnType = 'int2' || model.columnType = 'int4' || model.columnType = 'int8' || model.columnType = 'float4' || model.columnType = 'float8' || model.columnType = 'numeric')>
    @ApiModelProperty(value = "${model.columnComment}",example = "0")
        <#else>
    @ApiModelProperty("${model.columnComment}")
        </#if>
        <#if model.columnType = 'enum'>
    private ${model.changeEnumCode} ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'varchar' || model.columnType = 'text' || model.columnType = 'char' || model.columnType = 'bpchar'>
    private String ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'timestamp' >
    private Date ${model.changeColumnName?uncap_first};
        <#elseif (model.columnType = 'int2' || model.columnType = 'int4')>
    private Integer ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'int8' >
    private Long ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'float4' >
    private Float ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'float8' >
    private Double ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'numeric' >
    private BigDecimal ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'bool' >
    private Boolean ${model.changeColumnName?uncap_first};
        <#elseif model.columnType = 'date' >
    private Date ${model.changeColumnName?uncap_first};
        </#if>

    </#list>
</#if>
}
